<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: SunKai
  Date: 14-11-6
  Time: 上午10:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link type="text/css" rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap-table.css">
    <script type="text/javascript" src="/static/jquery-2.1.0.min.js"></script>
    <script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/static/bootstrap/js/bootstrap-table.js"></script>
    <title>配套设施</title>
  <script type="text/javascript">
      function flashInput(){
          $("#name").val("");
      }
      function submitForm(){
          var name= $("#name").val();
          $.ajax({
              type:"post",
              url:"/house/equipment/add",
              dataType:"json",
              data:{name:name},
              success:function(data){
                  alert(data.success );
              }   ,
              error: function(){
                 alert(123);
              }
          });
      }
  </script>
</head>
<body>
<div>
    <div style="margin: 10px 0 0px 10px;width: 400px;border: solid 1px #269abc"><label>度假屋 设施 </label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a  href="/house/equipment/form">添加</a><button class="btn btn-primary btn-lg" data-toggle="modal"
                                                       data-target="#myModal" style="display:none">新增</button></div>
</div>
<div style="margin: 10px 0 0px 10px;">
     <table data-toggle="table" >
         <thead>
         <tr>
             <th style="width:100px;text-align: left">设施名称</th>
             <th style="width:100px;text-align: left">创建时间</th>
             <th style="width:100px;text-align: left">操作</th>
         </tr>
         </thead>

         <tbody>
         <c:forEach items="${list}" var="list">
             <tr>
                 <td>${list.name}</td>
                 <td>${list.createDate}</td>
                 <td><a href="/house/equipment/update/${list.guid}">更新</a>&nbsp;&nbsp;<a href="/house/equipment/delete/${list.guid}">删除</a></td>
             </tr>
         </c:forEach>
         </tbody>
     </table>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <jsp:include page="equipmentPopup.jsp"/>
    </div>
</body>
</html>

